package com.tedu.DbDemo.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.tedu.DbDemo.mapper.UserMapper;
import com.tedu.DbDemo.pojo.User;

@RestController
public class TestController {
	//从spring框架的ioc容器中得到UserMapper接口的代理对象
	@Autowired
	UserMapper userMapper;
	
	@RequestMapping("/select1")
	public List<User> select1(){
		List<User> list=userMapper.select1();
		return list;
	}
	
	@RequestMapping("/select2")
	public List<User> select2(){
		List<User> list=userMapper.select2();
		return list;
	}

}






